<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../lib/vue-2.6.7.js"></script>

</head>
<body>
<div id="app">
    <h1>数组的v-for</h1>
    <ul>
        <li v-for="(item,index) in items">
            {{index}}===>{{item.message}}
        </li>
    </ul>
    <h1>对象的v-for</h1>
    <ul>
        <li v-for="value in object">
            {{value}}
        </li>
        <li v-for="(value,key,index) in object">
            {{index}}==>{{key}}==>{{value}}
        </li>
    </ul>
</div>
<script>
    const vm = new Vue({
        el: "#app",
        data:{
            items: [
                { message: 'Foo' },
                { message: 'Bar' }
            ],
            object: {
                firstName: 'John',
                lastName: 'Doe',
                age: 30
            }
        }
    })
</script>
</body>
</html>